package main

import (
	"example.com/m/v2/internal/infrastructure/gateway"
	"example.com/m/v2/internal/infrastructure/ioc"
	"log"
	"time"
)

func main() {
	accountFacade, err := ioc.GetAccountFacade()
	if err != nil {
		log.Fatalln(err)
	}

	gate := gateway.GetGatewayInstance()
	gateway.RegisterAccountFacade(gate, accountFacade)
	if err := gate.Start(":8080"); err != nil {
		log.Fatalln(err)
	}

	select {
	case <-time.After(60 * time.Second):
		return
	}
}
